package com.example.chenliang;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Component      //由于后面自动装备@Autowired时能扫描到此类
@ConfigurationProperties(prefix = "dev") //指明了配置文件中前缀为dev封装成对象
public class Developer {
    private String name;

    private Integer age;

    private Integer id;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Override
    public  String toString(){
        return "Developer:" + "name=" + name + "age=" + age.toString() + "id=" + id.toString();
    }
}
